package cn.tellsea.controller;


import cn.tellsea.entity.AjaxResult;
import cn.tellsea.service.IBizStorageService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 库存表 前端控制器
 * </p>
 *
 * @author Tellsea
 * @since 2021-12-31
 */
@RestController
@RequestMapping("/bizStorage")
public class BizStorageController {

    @Autowired
    private IBizStorageService storageService;

    @ApiOperation("扣减库存")
    @RequestMapping("/storage/decrease")
    public AjaxResult decrease(Long productId, Integer count) {
        return storageService.decrease(productId, count);
    }
}
